import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale

/**
 * 公用配置
 */
object Config {

    /**
     * 项目Gradle共用配置
     */
    object Basic {
        const val applicationId = "com.ellfors.Test_Demo"
        const val targetSdk = 34
        const val compileSdk = 34
        const val minSdk = 24
        val versionCode = createVersionCode()
        const val versionName = "1.0.0"
        const val arouterConfigKey = "AROUTER_MODULE_NAME"
        const val buildTypeDebug = "debug"
        const val buildTypeRelease = "release"

        // 生成VersionCode
        private fun createVersionCode(): Int {
            val currentTime = SimpleDateFormat("yyMMddHH", Locale.getDefault()).format(Date())
            return currentTime.toInt()
        }
    }

    /**
     * 签名文件配置
     */
    object Sign {
        const val filePath = "../sign_info/custom_key.jks"
        const val password = "123456"
        const val keyAlias = "cutomKey"
        const val keyPassword = "123456"
    }

    /**
     * 后台环境配置，例如测试环境、正式环境
     */
    object FlavorsEnv {
        const val KEY = "env"

        const val Dev = "dev"
        const val Product = "product"
    }

    /**
     * 分发渠道配置，例如：google、小米、华为等
     */
    object FlavorsChannel {
        const val KEY = "channel"

        const val CN = "cn"
        const val Google = "google"
    }

}